Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(remix-dev/vite): partial support for custom basename during dev #8141

Closed
wants to merge 2 commits into from

Conversation

hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Nov 27, 2023

Closes: #8052
References: #2891, #8077 (comment), #5236

(EDIT: This PR could be superseded by #8145. I'll keep it for now as a reference, but feel free to close this if this PR is considered unnecessary.)

For basic support of this feature, I added publicPath prefix to all client-visible urls, which was done only for "build" case so far.

Note that react-router is still not aware of the custom base, so users are still required to put prefix manually (for example, <Link to="/mybase/some-path" /> and also for route file routes/mybase.some-path.tsx), but the community might be okay with this restriction for starter.
(Actually, in this regard, I think Remix could revive what this PR did #5236. If it's preferred to get there directly, then I can try to integrate that change to here. Ah, maybe not, I don't think that PR is integrating react-router basename?)

As a continuation, I'm experimenting with integrating react-router's basename option in #8145

testing strategy

Currently I'm testing this patch in this repo https://github.com/hi-ogawa/remix-vite-custom-base.
I can also add playwright tests here if remix team decides the official way of supporting custom base.

Copy link

changeset-bot bot commented Nov 27, 2023

⚠️ No Changeset found

Latest commit: de0c066

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@hi-ogawa hi-ogawa changed the title feat(remix-dev/vite): support custom base feat(remix-dev/vite): partial support for custom base Nov 27, 2023
@hi-ogawa hi-ogawa changed the title feat(remix-dev/vite): partial support for custom base feat(remix-dev/vite): partial support for custom base during dev Nov 27, 2023
@hi-ogawa hi-ogawa changed the title feat(remix-dev/vite): partial support for custom base during dev feat(remix-dev/vite): partial support for custom basename during dev Nov 27, 2023
@hi-ogawa hi-ogawa marked this pull request as ready for review November 27, 2023 12:01
@brophdawg11
Copy link
Contributor

Closing in favor of #8145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants